<!DOCTYPE html  >
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<head th:include="/base/common_css('test')">

<body>
<div th:include="/base/common_banner"></div>

<!-- Header ends -->
<!-- Main content starts -->

<div class="content">

    <!-- Sidebar -->
    <!--menu ????-->
    <div th:include="/base/common_menu"></div>
    <!--menu????-->
    <!-- Sidebar ends -->

    <!-- Main bar -->
    <div class="mainbar">

        <!-- Page heading -->
        <div th:include="/base/common_pageHeader"></div>
        <!-- Page heading ends -->

        <div class="matter">
            <div class="container">

                <div class="row">
                    <div class="col-md-4">
                        <div class="widget">
                            <div class="widget-head">
                                <div class="pull-left">图片设置</div>
                                <div class="widget-icons pull-right">
                                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a>
                                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div class="widget-content">
                                <div class="padd">

                                    <!-- Form starts.  -->
                                    <form class="form-horizontal" role="form" action="#" method="post">

                                        <div class="modal-body">
                                            <form action="#" method="post"
                                                  enctype="multipart/form-data">
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">免费图片数</label>
                                                    <div class="col-lg-4">
                                                        <input type="text" th:value="${freeImgNum}" class="form-control"
                                                               id="freeImgNum" >
                                                    </div>
                                                </div>
                                            </form>
                                        </div>
                                    </form>
                                    <div class="modal-footer">
                                        <button type="button"  class="btn btn-cancel pull-right"
                                                onclick="canclle()">取消
                                        </button>
                                        <button type="button" onclick="saveSystem()"
                                                class=" btn btn-success pull-right">保存
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">
                        <div class="widget">
                            <div class="widget-head">
                                <div class="pull-left">文件上传</div>
                                <div class="widget-icons pull-right">
                                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a>
                                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div class="widget-content">
                                <div class="padd">

                                    <!-- Form starts.  -->
                                    <form  action="/view/upload" method="post" enctype="multipart/form-data">

                                        <div class="modal-body">
                                            <div class="form-group">
                                                <form action="/view/upload" method="post" enctype="multipart/form-data">
                                                    选择文件:<input type="file" name="file" width="200px">
                                                    <input type="submit" value="上传" class="btn btn-success">
                                                </form>
                                                <hr>
                                            </div>
                                        </div>

                                    </form>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!--footer-->
<div th:include="/base/common_footer"></div>
<!---->


<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>

<!--js????-->
<div th:include="/base/common_js"></div>
<!--js????-->

<!-- Script for this page -->
<script type="text/javascript">
function canclle(){
    window.location="/view/system";
}
function saveSystem(){

        var data = {
            'freeImgNum': $('#freeImgNum').val(),
        }
        $.ajax({
            url: "/view/saveSystem",
            type: "POST",
            dataType: "json",
            data: data,
            success: function (data) {

                if (data.data) {
                    window.location.href = "/view/system";
                }
            },
        })

}


</script>

</body>
</html>
